home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 46 / Amiga Format CD46 (1999-10-20)(Future Publishing)(GB)[!][issue 1999-12].iso / -serious- / programming / other / tandem / teaching / 11.asm < prev    next >
Assembly Source File  |  1999-09-06  |  281b  |  9 lines

  1. * 11.asm   Demonstate a DBRA loop       version 0.00    1.9.97
  2.  
  3.  move.l #0,d0
  4.  move.w #9,d1 ;D1 is the control variable: see line 0006. Loops D1-1 times
  5. Loop:
  6.  add.l #10,d0
  7.  dbra d1,Loop ;decrement D1, go to loop if D1<>$FFFF
  8.  rts          ;if D1=$FFFF, falls through to this line
  9.